package com.example.consumptionrecords.config.shiro;

import lombok.*;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.HostAuthenticationToken;
import org.apache.shiro.authc.RememberMeAuthenticationToken;
import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * 自定义认证token
 * hhzr9
 * 2024 \ 03 \ 31
 */


@Data
@NoArgsConstructor
@AllArgsConstructor
public class PhoneAuthCodeToken implements AuthenticationToken {

	private String phone;

	private String authCode;

	@Override
	public Object getPrincipal() {
		return getPhone();
	}

	@Override
	public Object getCredentials() {
		return getAuthCode();
	}
}
